extends RayCast2D


# Called when the node enters the scene tree for the first time.
func _ready() -> void:
	pass # Replace with function body.


# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
	pass
func _physics_process(_delta: float) -> void:
	#检查是否有碰撞
	if is_colliding():
		# 获取碰撞的节点名称
		var node_name = self.get_collider().name
		# 打印节点名称
		print(node_name)
	pass